<jtmpl:comment>
@version	$Id: migration.html 6450 2007-02-01 16:36:11Z hackwar $
@package	Joomla
@subpackage	Installation
@copyright	Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
@license	GNU/GPL
</jtmpl:comment>
<script language="JavaScript" type="text/javascript">
<!--
	function validateForm( frm, task ) {
		var valid = document.formvalidator.isValid(frm);
		submitForm( frm, task );
	}

	function selectMode() {
		var frm = this.document.filename;
		if(frm.what_to_load[0].checked) {
			frm.instDefault.disabled = false;
			frm.sqlFile.disabled = true;
			frm.sqlLoad.disabled = true;
			frm.oldPrefix.disabled = true;
			frm.srcEncoding.disabled = true;
			frm.migrationFile.disabled = true;
			frm.migrationLoad.disabled = true;
		} else if(frm.what_to_load[1].checked) {
			frm.instDefault.disabled = true;
			frm.sqlFile.disabled = false;
			frm.sqlLoad.disabled = false;
			frm.oldPrefix.disabled = true;
			frm.srcEncoding.disabled = true;
			frm.migrationFile.disabled = true;
			frm.migrationLoad.disabled = true;
		} else if(frm.what_to_load[2].checked) {
			frm.instDefault.disabled = true;
			frm.sqlFile.disabled = true;
			frm.sqlLoad.disabled = true;
			frm.oldPrefix.disabled = false;
			frm.srcEncoding.disabled = false;
			frm.migrationFile.disabled = false;
			frm.migrationLoad.disabled = false;
		}
	}

	function JDefault() {
		this.document.filename.dataLoaded.value = '1';
		xajax_instDefault(xajax.getFormValues('filename'));
	}

	function externalSql(frm, task) {

		if (frm.sqlFile.value == '') {
			alert( '<jtmpl:translate escape="yes">No file selected</jtmpl:translate>' );
			return;
		} else {
			frm.sqlupload.value = '1';
			frm.dataLoaded.value = '1';
			submitForm(frm, task);
		}
	}

	function migrationSql(frm, task) {

		if (frm.migrationFile.value == '') {
			alert( '<jtmpl:translate escape="yes">No file selected</jtmpl:translate>' );
			return;
		} else {
			frm.migrationupload.value = '1';
			frm.dataLoaded.value = '1';
			submitForm(frm, task);
		}
	}

	function clearPasswordFields(frm) {
		var adminPassword 			= getElementByName( frm, 'vars[adminPassword]' );
		var confirmAdminPassword 	= getElementByName( frm, 'vars[confirmAdminPassword]' );

		if( adminPassword.defaultValue == adminPassword.value || confirmAdminPassword.defaultValue == confirmAdminPassword.value ) {
			adminPassword.value 		= '';
			confirmAdminPassword.value 	= '';
		}
		return;
	}
//-->
</script>

<div id="right">
	<div id="rightpad">
		<div id="step">
			<div class="t">
		<div class="t">
			<div class="t"></div>
		</div>
		</div>
		<div class="m">
				<div class="far-right">
					<jtmpl:tmpl name="buttons" type="condition" conditionvar="direction">
						<jtmpl:sub condition="ltr">
							<div class="button1-right"><div class="prev"><a onclick="submitForm( adminForm, '{PREVIOUS}' );" alt="<jtmpl:translate escape="yes">Previous</jtmpl:translate>"><jtmpl:translate escape="yes">Previous</jtmpl:translate></a></div></div>
							<div class="button1-left"><div class="next"><a onclick="validateForm( adminForm, 'mainconfig' );" alt="<jtmpl:translate escape="yes">Next</jtmpl:translate>"><jtmpl:translate escape="yes">Next</jtmpl:translate></a></div></div>
						</jtmpl:sub>
						<jtmpl:sub condition="rtl">
							<div class="button1-right"><div class="prev"><a onclick="validateForm( adminForm, 'mainconfig' );" alt="<jtmpl:translate escape="yes">Next</jtmpl:translate>"><jtmpl:translate escape="yes">Next</jtmpl:translate></a></div></div>
							<div class="button1-left"><div class="next"><a onclick="submitForm( adminForm, '{PREVIOUS}' );" alt="<jtmpl:translate escape="yes">Previous</jtmpl:translate>"><jtmpl:translate escape="yes">Previous</jtmpl:translate></a></div></div>
						</jtmpl:sub>
					</jtmpl:tmpl>
				</div>
				<span class="step"><jtmpl:translate>Site Migration</jtmpl:translate></span>
			</div>
		<div class="b">
		<div class="b">
			<div class="b"></div>
		</div>
		</div>
	</div>

	<div id="installer">
			<div class="t">
		<div class="t">
			<div class="t"></div>
		</div>
		</div>
		<div class="m">

				<h2><jtmpl:translate>Migration Output</jtmpl:translate>:</h2>

				<iframe src="migration.html" name="migrationtarget" class="license" frameborder="0" marginwidth="25" scrolling="none"></iframe>

				<div class="clr"></div>
		</div>
		<div class="b">
		<div class="b">
			<div class="b"></div>
		</div>
		</div>
		</div>
	</div>
</div>

<div class="clr"></div>

<!-- Variables -->
<form action="index.php" method="post" name="adminForm" id="adminForm" class="form-validate">
	<input type="hidden" name="task" value="dumpLoad" />
	<input type="hidden" name="sqlupload" value="0" />
  	<input type="hidden" name="migrationupload" value="0" />
  	<input type="hidden" name="migration" value="{VAR_MIGRATION}" />
  	<input type="hidden" name="loadchecked" value="{VAR_LOADCHECKED}" />
  	<input type="hidden" name="dataLoaded" value="{VAR_DATALOADED}" />
  	<input type="hidden" name="DBtype" value="{VAR_DBTYPE}" />
  	<input type="hidden" name="DBhostname" value="{VAR_DBHOSTNAME}" />
  	<input type="hidden" name="DBuserName" value="{VAR_DBUSERNAME}" />
  	<input type="hidden" name="DBpassword" value="{VAR_DBPASSWORD}" />
  	<input type="hidden" name="DBname" value="{VAR_DBNAME}" />
  	<input type="hidden" name="DBPrefix" value="{VAR_DBPREFIX}" />
  	<input type="hidden" name="ftpRoot" value="{VAR_FTPROOT}" />
  	<input type="hidden" name="ftpEnable" value="{VAR_FTPENABLE}" />
  	<input type="hidden" name="ftpHost" value="{VAR_FTPHOST}" />
  	<input type="hidden" name="ftpPort" value="{VAR_FTPPORT}" />
  	<input type="hidden" name="ftpUser" value="{VAR_FTPUSER}" />
  	<input type="hidden" name="ftpPassword" value="{VAR_FTPPASSWORD}" />
  	<input type="hidden" name="lang" value="{VAR_LANG}" />
  	<input type="hidden" name="vars[migresponse]" value="<jtmpl:translate>Migration completed</jtmpl:translate>" />
  	<input type="hidden" name="vars[migstatus]" value="1" />
  	<input type="hidden" name="vars[dataLoaded]" value="1" />
  	<input type="hidden" name="vars[loadchecked]" value="1" />
</form>
<form action="index.php" method="post" name="migrateForm" id="migrateForm" class="form-validate" target="migrationtarget">
	<input type="hidden" name="task" value="dumpLoad" />
  	<jtmpl:tmpl name="migration">	<input type="hidden" name="migration" value="{MIGRATION}" /></jtmpl:tmpl>
  	<input type="hidden" name="loadchecked" value="{VAR_LOADCHECKED}" />
  	<input type="hidden" name="dataLoaded" value="{VAR_DATALOADED}" />
  	<input type="hidden" name="migration" value="{VAR_MIGRATION}" />
  	<input type="hidden" name="DBtype" value="{VAR_DBTYPE}" />
  	<input type="hidden" name="DBhostname" value="{VAR_DBHOSTNAME}" />
  	<input type="hidden" name="DBuserName" value="{VAR_DBUSERNAME}" />
  	<input type="hidden" name="DBpassword" value="{VAR_DBPASSWORD}" />
  	<input type="hidden" name="DBname" value="{VAR_DBNAME}" />
  	<input type="hidden" name="DBPrefix" value="{VAR_DBPREFIX}" />
  	<input type="hidden" name="ftpRoot" value="{VAR_FTPROOT}" />
  	<input type="hidden" name="ftpEnable" value="{VAR_FTPENABLE}" />
  	<input type="hidden" name="ftpHost" value="{VAR_FTPHOST}" />
  	<input type="hidden" name="ftpPort" value="{VAR_FTPPORT}" />
  	<input type="hidden" name="ftpUser" value="{VAR_FTPUSER}" />
  	<input type="hidden" name="ftpPassword" value="{VAR_FTPPASSWORD}" />
  	<input type="hidden" name="lang" value="{VAR_LANG}" />
  	<input type="hidden" name="start" value="1" />
	<input type="hidden" name="foffset" value="0" />
	<input type="hidden" name="totalqueries" value="0" />
</form>
<script language="JavaScript" type="text/javascript">window.setTimeout('submitForm(this.document.migrateForm,"dumpLoad")',500);</script>
